﻿using Microsoft.AspNetCore.Authorization;

namespace YiShop.Framework.Authorization
{
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
    public class AppAuthorizeAttribute : AuthorizeAttribute
    {
        public AppAuthorizeAttribute(string permission)
        {
            Policy = permission; // 将权限名称作为策略名称
        }
    }
}